
#ifndef _LOCK_H_INCLUDE_
#define _LOCK_H_INCLUDE_

#include <Windows.h>

//
//
//
class CCriticalSectionX
{
	friend class CLock;

public:
	CCriticalSectionX();
	~CCriticalSectionX();

private:
	void EnterCriticalSection();
	void LeaveCriticalSection();

private:
	CRITICAL_SECTION m_cs;
};

//
//
//
class CLock
{
public:
	CLock(CCriticalSectionX& cs);
	~CLock();

private:
	void Lock();
	void Unlock();

protected:
	CCriticalSectionX* m_pcs;
};

#endif